/*
 * File:   ListOfTask.cpp
 * Author: Nicolas Proust & Pierre-Antoine Jahan
 *
 * Created on 22 janvier 2013, 21:33
 */

#include "ListOfTask.h"

ListOfTask::ListOfTask(string name_, Date date_) : name(name_), date(date_) {}

ListOfTask::ListOfTask(string name_) : name(name_) {}

ListOfTask::~ListOfTask() {
}

void ListOfTask::setName(string name) {
    this->name = name;
}

string ListOfTask::getName() const {
    return name;
}

void ListOfTask::setDate(Date date) {
    this->date = date;
}

Date ListOfTask::getDate() const {
    return date;
}
list<Task*> ListOfTask::getTasks() const{
    return tasksList;
}

//Gestion de la liste des taches
void ListOfTask::addTask(Task* t) {
    tasksList.push_back(t);
}

void ListOfTask::removeTask(Task* t) {
    tasksList.remove(t);
}

int operator==(ListOfTask const &a, ListOfTask const &b) {
    if(a.getName()==b.getName()) return true;
    else return false;
}